<!DOCTYPE html>
<html>
  <head>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.setPopupBlockingEnabled(false);
    testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
    testRunner.waitUntilDone();
}

function opened(result) {
    // Called by the embedded iframe.
    if (result == window) {
        document.writeln("FAIL");
        document.close();
    }

    if (window.testRunner)
        testRunner.notifyDone();
}

</script>
  </head>
  <body>
    <iframe src="resources/child-opens-window.html" sandbox="allow-scripts allow-popups allow-same-origin"></iframe>
    PASS
  </body>
</html>
